import React from 'react';
// React Data Grid Component
import { AG_GRID_LOCALE_CN } from '@ag-grid-community/locale';
import { AllCommunityModule, ModuleRegistry } from 'ag-grid-community';
import {
  AllEnterpriseModule,
  IntegratedChartsModule,
  LicenseManager,
} from 'ag-grid-enterprise';
// import { AgChartsEnterpriseModule } from "ag-charts-enterprise";
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
import 'ag-grid-community/styles/ag-grid.css';
import 'ag-grid-community/styles/ag-theme-balham.css';
import { AgGridReact } from 'ag-grid-react';

/**
 * 破解代码
 * 本地测试使用
 * 禁止商用
 * */
LicenseManager.setLicenseKey(
  '[v3][RELEASE][0102]_NDg2Njc4MzY3MDgzNw==16d78ca762fb5d2ff740aed081e2af7b',
);

// Register all Community features
ModuleRegistry.registerModules([
  AllCommunityModule,
  AllEnterpriseModule,
  IntegratedChartsModule.with(AgChartsEnterpriseModule),
  // SetFilterModule,
  // MultiFilterModule,
  // CellSelectionModule,
  // // AgChartsEnterpriseModule,
  // // IntegratedChartsModule.with(AgChartsEnterpriseModule),
  // SideBarModule,
  // RowGroupingModule,
  // ColumnsToolPanelModule,
  // FiltersToolPanelModule,
]);

// import './styles.less';

const SAgTable = (props) => {
  return (
    <div className="ag-theme-balham" style={{ height: '100%', width: '100%' }}>
      <AgGridReact localeText={AG_GRID_LOCALE_CN} {...props} />
    </div>
  );
};

export default SAgTable;
